import updateMeta from './update.lib/updateMeta.js';


let isWorking = false;

const method = 'post';
const handle = async function(raw, ctx, rout, $) {
	if(!isWorking) {
		isWorking = true;

		setTimeout(() => updateMeta($.W).finally(() => isWorking = false), 1000);

		return { success: true };
	}

	return { success: false, message: '更新正在进行' };
};


export { method, handle };